package com.keyao.subject.common.enums;

import lombok.Getter;

/**
 * 删除状态枚举
 */
@Getter
public enum IsDeletedEnum {
    DELETED(1, "已删除"),
    UN_DELETED(0, "未删除");

    private Integer code;
    private String desc;

    IsDeletedEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static IsDeletedEnum getByCode(Integer codeVal)
    {
        for (IsDeletedEnum codeEnum : IsDeletedEnum.values())
        {
            if (codeEnum.code == codeVal)
            {
                return codeEnum;
            }
        }
        return null;
    }

}
